if SERVER then
	function ACHIEVEMENT:OnNPCKilled (npc, atk, wpn)
		if (!IsValid(atk) or !atk:IsPlayer()) then return end
	
		local weap = atk:GetActiveWeapon()
		if ( !IsValid( weap ) ) then return end
	
		if (weap.Slot != 1) or (weap.Primary.Automatic != false) then return end
	
		local kills = self:GetValue( atk, "kills", 0 )
		self:SetValue( atk, "kills", kills + 1 )
	end
	
	function ACHIEVEMENT:SendUpdate(ply, last)
		local kills = self:GetValue(ply, "kills", 0)
		printd("Kills: ", kills, "\tLast: ", last)
		if kills - (last or 0) >= 10 then
			printd("Sending")
			return kills - (last or 0), kills
		end
	end
end
if CLIENT then
	local target = 150

	ACHIEVEMENT.Name			= "Incursion: Pistol Master"
	ACHIEVEMENT.Description		= "Kill "..target.." enemies using semi-automatic pistols."
	ACHIEVEMENT.Icon			= "achievements/incursion"
	
	local total = ACHIEVEMENT:GetValue("total", 0)
	function ACHIEVEMENT:ReceiveValue(value)
		if total >= target then return end
		
		total = math.min(total + value, target)
		self:SetValue("total", total)
		self:Update(total / target, math.floor(total) .. "/" .. target)
	end
	
	ACHIEVEMENT:Register(total / target, math.floor(total) .. "/" .. target)
end